#include "label.h"

Label::Label(QWidget* parent) : QLabel(parent)
{
    ;
}


void Label::mousePressEvent(QMouseEvent *ev)
{
    if(ev->button() == Qt::LeftButton)
        qDebug() << "leftButton";
    else if(ev->button() == Qt::RightButton)
        qDebug() << "rightButton";
    qDebug() << "position:" + QString::number(ev->x()) + ev->y();

    qDebug() << "global position:" + QString::number(ev->globalX()) + ev->globalY();

}

void Label::mouseReleaseEvent(QMouseEvent *event)
{
    if(event->button() == Qt::LeftButton)
        qDebug() << "leftButtonRelease";
    else if (event->button() == Qt::RightButton)
        qDebug() << "rightButtonRelease";

}

void Label::mouseDoubleClickEvent(QMouseEvent *event)
{
    if(event->button() == Qt::LeftButton)
        qDebug() << "leftButtonDouble";
    else if (event->button() == Qt::RightButton)
        qDebug() << "rightButtonDouble";

}


